﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

using UnityEngine.Rendering.PostProcessing;

public class ppContrl : MonoBehaviour {

    private Wave wave;
    private PostProcessVolume volume;
	// Use this for initialization
	void Start () {
        Init();
	}
	
    void Init()
    {
        volume = this.GetComponent<PostProcessVolume>();
        if (volume != null && volume.profile != null)
        {
            volume.profile.TryGetSettings<Wave>(out wave);
        }
        else
        {
            Debug.LogError("cannot find volume ");
        }

        if (wave == null)
        {
            Debug.LogError("cannot find");
        }

    }

    public void DoWave(float endValue,float duration)
    {
        //wave.waveStrength =  
    }
	
}
